package com.joshluisaac.futures.threads;

/**
 * A callable implementation that is used to create a
 * future task
 * @author joshua
 */

import java.util.concurrent.Callable;


public class MyCallable implements Callable<String> {

	private long waitTime;

	public MyCallable(int timeInMillis) {
		this.waitTime = timeInMillis;
	}

	@Override
	public String call() throws Exception {
		Thread.sleep(waitTime);
		// return the thread name executing this callable task
		return Thread.currentThread().getName();
	}
}
